Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

297
Views
How to disable a "Reload site? Changes you made may not be saved" popup for cypress(JS) test in chrome?

https://i.stack.imgur.com/AKoH3.png

I want to disable or accept this reload pop up in cypress. Is there any way to do this ?

cy.trigger('keydown', {
        key: 'Enter',
      }); 

I also tried to just send enter key but didn't work.

window.onbeforeunload = null;
    Cypress.on('window:before:load', (win) => {
      Object.defineProperty(win, 'onbeforeunload', {
        value: undefined,
        writable: false,
      })
    })

I put this code block in my "beforeEach" also didn't work for me.

I want to disable this pop up.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!